import request from '../utils/request.js'  // 改为相对路径

/**
 * 获取仪表盘综合数据
 * @returns {Promise<any>}
 */
export function getDashboardData() {
  return request({
    url: '/api/factory/dashboard/data',
    method: 'get'
  })
}

/**
 * 获取能源消耗数据
 * @returns {Promise<any>}
 */
export function getEnergyData() {
  return request({
    url: '/api/factory/dashboard/energy',
    method: 'get'
  })
}

/**
 * 获取生产统计数据
 * @returns {Promise<any>}
 */
export function getProductionData() {
  return request({
    url: '/api/factory/dashboard/production',
    method: 'get'
  })
}

/**
 * 获取气体消耗数据
 * @returns {Promise<any>}
 */
export function getGasEmissionData() {
  return request({
    url: '/api/factory/dashboard/gas',
    method: 'get'
  })
}

/**
 * 获取能源使用占比数据
 * @returns {Promise<any>}
 */
export function getEnergyUsageData() {
  return request({
    url: '/api/factory/dashboard/energy/usage',
    method: 'get'
  })
}

/**
 * 获取设备状态数据
 * @returns {Promise<any>}
 */
export function getDeviceData() {
  return request({
    url: '/api/factory/dashboard/devices',
    method: 'get'
  })
}

/**
 * 获取销售趋势数据
 * @returns {Promise<any>}
 */
export function getSalesTrendData() {
  return request({
    url: '/api/factory/dashboard/sales/trend',
    method: 'get'
  })
}

// 其他导出函数... 